package com.legend.utils;

public enum ReturnCode {

    NotImplementLabel(400001003, "未实现的标签");
    private String description;
    private int code;

    public int getCode() {
        return code;
    }

    public void setValue(int code) {
        this.code = code;
    }

    public String getDescription() {
        for (ReturnCode c : ReturnCode.values()) {
            if (c.getCode() == code) {
                return c.description;
            }
        }
        return null;
    }

    public void setDescription(String name) {
        this.description = name;
    }

    private ReturnCode(int code, String description) {
        this.description = description;
        this.code = code;
    }
}
